package com.vf.admin.miaodong.service.impl;

import com.vf.admin.common.splitpage.SplitPageBean;
import com.vf.admin.miaodong.dao.AfterRoomLaHeiDao;
import com.vf.admin.miaodong.entity.AppRoomLaHei;
import com.vf.admin.miaodong.service.AfterRoomLaHeiService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * @author anxiang
 * @version 1.0.0
 * @ClassName AfterRoomLaHeiServiceImpl.java
 * @Description 房间拉黑
 * @createTime 2021年07月28日 18:30:00
 */
@Service
public class AfterRoomLaHeiServiceImpl implements AfterRoomLaHeiService {

    @Autowired
    AfterRoomLaHeiDao afterRoomLaHeiDao;

    /**
     * 新增/修改
     * @param appRoomLaHei
     */
    @Override
    public void saveOrUpdate(AppRoomLaHei appRoomLaHei) {
        afterRoomLaHeiDao.saveOrUpdate(appRoomLaHei);
    }

    /**
     * 综合查询
     */
    @Override
    public List<AppRoomLaHei> findList(Map<String, Object> paramap, SplitPageBean splitPageBean) {
        return afterRoomLaHeiDao.findList(paramap,splitPageBean);
    }

    /**
     * 根据房间ID和用户ID查询拉黑名单信息
     * @param roomid
     * @param userid
     * @return
     */
    @Override
    public AppRoomLaHei getByRoomidAndUserid(Integer roomid, Integer userid) {
        return afterRoomLaHeiDao.getByRoomidAndUserid(roomid, userid);
    }

    /**
     * 删除
     * @param id
     */
    @Override
    public void delete(Integer id) {
        afterRoomLaHeiDao.delete(id);
    }
}